#include "gif.h"

Gif::Gif()
{

}
void Gif::open(const char *p)
{
    fis = new ifstream();
    fis->open(p,ios::in);
    header = new GIFHEADER();
    fis->read((char*)header,sizeof(GIFHEADER));
}
string Gif::get_version()
{
    if(header)
    {
        return string((const char*)header->byVersion);
    }
    return string();
}
string Gif::get_signature()
{
    if(header)
    {
        return string((char*)header->bySignature);
    }
    return string();

}
Gif::~Gif()
{
    if(fis!=NULL)
    {
        fis->close();
            delete fis;


    }
    if(header!=NULL)
    {
        delete header;
    }

}
